#ifndef __V_COMMON_H__
#define __V_COMMON_H__

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdio.h>
#include "util.h"
#include "malloc.h"

/*********************
 *      MACROS
 *********************/
#define DATA_CAST(data_type)        *(data_type*)

#define v_malloc    k_malloc
#define v_realloc   k_realloc
#define v_free      k_free

/**********************
 *      TYPEDEFS
 **********************/
typedef enum {
    VLIB_OK          =  1,
    VLIB_ERROR       =  0,
    VLIB_OVERFLOW    = -2
} vlib_status_t;

typedef void*           v_data_ptr_t;
typedef const void *    vc_data_ptr_t;
typedef void (*copy_data_f)(v_data_ptr_t, vc_data_ptr_t);

#ifdef __cplusplus
} /*extern "C"*/
#endif

#endif  /* __V_COMMON_H__ */
